import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/category',
    name: 'category',
    component: () => import('../views/Category.vue')
  },
  {
    path: '/categoryList/:id',
    name: 'categoryList',
    props: true,
    component: () => import('../views/CategoryList.vue')
  },
  {
    path: '/product/:id',
    name: 'product',
    props: true,
    component: () => import('../views/Product.vue')
  },
  {
    path: '/buycart',
    name: 'buycart',
    component: () => import('../views/buycart.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
